import { createRouter, createWebHistory } from 'vue-router'
import Layout from "../layout/Layout";
import Home from "../views/Home";

const routes = [
  {
    path: '/',
    name: 'Layout',
    component: Layout,
    redirect: '/home',
    children:[
      {
        path:'/home',
        name:'首页',
        component: () => import('@/views/Home')
      }
    ]

  },
  { path: '/login',
    component: () => import('@/views/login/index'),
    hidden: true
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
